import java.util.Scanner;

/**
 * @author gao
 * @date 2025/10/31 22:58
 */

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt() * 100;
            int foot = n / 3048;
            int tmp = n % 3048;
            int inch = tmp * 12 / 3048;
            System.out.println(foot + " " + inch);
        }
    }
}